package com.egg.auth.feign;

import com.egg.auth.feign.fallback.AuthAccountFeignClientFallback;
import com.egg.auth.model.response.web.UserAccountInfo;
import com.egg.common.core.model.response.ResponseData;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(
        value = "auth"
        , url = "${api.feign.url.auth:}"
        , fallbackFactory = AuthAccountFeignClientFallback.class
)
public interface AuthAccountFeignClient {


    @GetMapping("/feign/account/info")
    ResponseData<UserAccountInfo> userAccountInfo(
            @ApiParam(value = "用户ID", required = true) @RequestParam(value = "userId") Long userId
            , @ApiParam(value = "账号类型", required = true) @RequestParam(value = "accountType") String accountType
    );


}
